package com.xuecheng.content.service;

import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.content.domain.CoursePub;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.web.exceptions.BusinessException;
import freemarker.template.TemplateException;
import io.minio.errors.*;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Map;

/**
 * <p>
 * 课程发布 服务类
 * </p>
 *
 * @author 七安
 * @since 2022-09-17
 */
public interface CoursePubService extends IService<CoursePub> {

    /**
     * 课程发布预览
     * @param courseBaseId id
     * @return 结果
     */
    Map<String, Object> releasePreview(Long courseBaseId) throws BusinessException;

    /**
     * 课程发布
     * @param courseBaseId 课程id
     * @return 发布结果
     */
    ResponseResult coursePublish(Long courseBaseId) throws BusinessException, IOException, TemplateException, ServerException, InvalidBucketNameException, InsufficientDataException, ErrorResponseException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;
}
